<!--
- @founder   IT柏拉图, https: //weibo.com/itprato
- @author    DedeCMS团队
- @copyright Copyright (c) 2007 - 2021, 上海卓卓网络科技有限公司 (DesDev, Inc.)
--->

<html>
<head>
<meta charset="{dede:global.cfg_soft_lang/}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>修改自由列表</title>
<meta name="copyright" content="2007-2021 DedeCMS, 上海卓卓网络科技有限公司 (DesDev, Inc.)" />
<link rel="icon" href="/favicon.ico" />
<!-- CSS FILES -->
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/pkg/uikit/css/uikit.min.css" />
<link rel="stylesheet" type="text/css" href="{dede:global.cfg_assets_dir/}/css/manage.dede.css">
<style type="text/css">
.uk-table td{
padding: 6px 12px;
vertical-align: top;
height: 35px;
}
</style>
</head>
<body>
<!-- 列表头部 -->
<div id="Table_Header_202X2W2X1X292F" class="uk-card uk-card-small uk-card-default" uk-sticky="bottom: #offset">
<div id="Header_1W2T2S2T1V252B" class="uk-card-header">
<div class="uk-grid uk-grid-small uk-text-small">
<span><ul class="uk-breadcrumb"><li><a href="freelist_main.php">自自由列表管理</a></li><li><span>修改自由列表</span></li></ul></span>
</div>
</div>
</div>
<!-- /列表头部 -->
<!-- 列表主体 -->
<div class="uk-card uk-card-small uk-card-default" style="top:-20px;margin-bottom: 50px;">
<div class="uk-card-body uk-overflow-auto" grid>
<div class="uk-child-width-1-1 uk-padding">
<table width="98%" border="0" cellpadding="1" cellspacing="1" class="uk-table">
<form action="freelist_edit.php" method="post" name="form1" onSubmit="return CheckSubmit();">
<input type="hidden" name="dopost" value="save">
<input type="hidden" name="aid" value="<?php echo $row['aid']?>">
<!-- 选项 -->
<tr>
<td height="28" colspan="2" align="left"><img src="images/help.png" width="16"
height="16">自由列表标记的说明：自由列表标记(freelist)的功能基本等同于arclist标记，区别是freelist标记支持分页，这让生成Google
Map、生成按自定义排序规则的文章列表（如按标题拼音部首排序等）等轻松的实现统一化管理，并且自由列是独立编译的，不与其它模板混在一起，这样不会影响系统生成HTML或访问速度。</td>
</tr>
<tr>
<td width="16%" height="28" align="left">自由列表标题：</td>
<td width="84%" align="left"><input name="title" type="text" id="title" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $row['title']?>"></td>
</tr>
<tr>
<td height="28" align="left">列表HTML存放目录：</td>
<td align="left"><input name="listdir" type="text" id="listdir" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $row['listdir']?>"> {listdir}变量的值</td>
</tr>
<tr>
<td height="28" align="left">目录默认页名称：</td>
<td align="left"> <input name="defaultpage" type="text" id="defaultpage" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $row['defaultpage']?>">&nbsp;&nbsp;
<input name="nodefault" type="checkbox" id="nodefault" class="uk-checkbox" value="1" <?php if($row['nodefault']==1) echo " checked" ; ?>>
不使用目录默认主页
</td>
</tr>
<tr>
<td height="28" align="left">命名规则：</td>
<td align="left"><input name="namerule" type="text" id="namerule" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $row['namerule']?>"></td>
</tr>
<tr>
<td height="30" align="left">列表模板：</td>
<td align="left"><input name="templet" type="text" id="templet" class="uk-input uk-form-small uk-form-width-large" value="<?php echo $row['templet']?>">
</td>
</tr>
<tr>
<td height="30" align="left">最大列出页数：</td>
<td align="left">
<input name="maxpage" type="text" id="maxpage" value="100" value="<?php echo $row['maxpage']?>" class="uk-input uk-form-small uk-form-width-small">
</td>
</tr>
<tr>
<td height="28" align="left">&nbsp;</td>
<td align="left">以下选项用于模板里的 &lt;meta name=&quot;keywords|description&quot;
content=&quot;&quot;&gt; 描述</td>
</tr>
<tr>
<td height="28" align="left">关键字：</td>
<td align="left"><input name="keywords" type="text" id="keywords" value="<?php echo $row['keywords']?>" class="uk-input uk-form-small uk-form-width-large"></td>
</tr>
<tr>
<td height="28" align="left">列表描述：</td>
<td align="left"><textarea name="description" id="description" style="height:50px" class="uk-textarea uk-form-small uk-form-width-large"><?php echo $row['description']?></textarea></td>
</tr>
<tr>
<td height="28" align="left">列表样式：</td>
<td align="left">
这里是定义自由列表模板里的{ dede:freelist/}标记的样式和属性
</td>
</tr>
<tr>
<td height="28" align="left">限定栏目：</td>
<td align="left">
<select name='typeid' class="uk-select uk-form-small uk-form-width-medium">
<?php
$typeid = $ctag->GetAtt('typeid');
echo "<option value='0'>不限栏目...</option>\r\n";
$dsql->SetQuery("Select id,typename, channeltype From #@__arctype");
$dsql->Execute();
while($lrow = $dsql->GetObject()){
$disable = '';
if($lrow->channeltype < -1)
{
$disable = 'disabled';
}
if($lrow->id==$typeid) echo "<option value='{$lrow->id}' selected $disable>{$lrow->typename}</option>\r\n";
else echo "<option value='{$lrow->id}' $disable>{$lrow->typename}</option>\r\n";
}
?>
</select>
</td>
</tr>
<tr>
<td height="28" align="left" > 限定频道：
</td>
<td height="28" align="left" >
<select name='channel' class="uk-select uk-form-small uk-form-width-medium">
<?php
$channel = $ctag->GetAtt('channel');
$dsql->SetQuery("Select id,typename From #@__channeltype where id>0");
$dsql->Execute();
while($nrow = $dsql->GetObject())
{
if($nrow->id==$channel) echo "<option value='{$nrow->id}' selected>{$nrow->typename}</option>\r\n";
else echo "<option value='{$nrow->id}'>{$nrow->typename}</option>\r\n";
}
?>
</select>
　(如果限定了频道内容类型，则允许使用附加表指定的列表字段作为底层变量)
</td>
</tr>
<tr>
<td height="28" align="left">附加属性：
</td>
<td height="28" align="left">
<select name='att' class="uk-select uk-form-small uk-form-width-medium">
<?php
$att = $ctag->GetAtt('att');
echo "<option value='0'>不限...</option>\r\n";
$dsql->SetQuery("Select * From #@__arcatt");
$dsql->Execute();
while($nrow = $dsql->GetObject())
{
if($att==$nrow->att)
{
echo "<option value='{$nrow->att}' selected>{$nrow->attname}</option>\r\n";
}
else
{
echo "<option value='{$nrow->att}'>{$nrow->attname}</option>\r\n";
}
}
?>
</select>
文档发布时间：
<input name="subday" type="text" id="subday2" value="0" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $ctag->GetAtt('subday')?>">
天以内 （0 表示不限）
</td>
</tr>
<tr>
<td height="28" align="left">每页记录数：</td>
<td height="28" align="left">
<input name="pagesize" type="text" id="pagesize" value="30" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $ctag->GetAtt('pagesize')?>">
　显示列数：
<input name="col" type="text" id="col3" value="1" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $ctag->GetAtt('col')?>">
标题长度：
<input name="titlelen" type="text" id="titlelen" value="60" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $ctag->GetAtt('titlelen')?>">
（1 字节 = 0.5个中文字）
</td>
</tr>
<tr>
<td height="28" align="left"> 高级筛选：</td>
<td height="28" align="left">
<input name="types[]" type="checkbox" id="type1" class="uk-checkbox" value="image" <?php if(preg_match("#image#i",$setype)) echo ' checked' ;?>> 带缩略图 &nbsp;&nbsp;
<input name="types[]" type="checkbox" id="type2" class="uk-checkbox" value="commend" <?php if(preg_match("#commend#i",$setype)) echo ' checked' ;?>> 推荐 &nbsp;&nbsp;
<input name="types[]" type="checkbox" id="type3" class="uk-checkbox" value="spec" <?php if(preg_match("#spec#i",$setype)) echo ' checked' ;?>> 专题　关键字：&nbsp;&nbsp;
<input name="keywordarc" type="text" id="keywordarc" class="uk-input uk-form-small uk-form-width-small" value="<?php echo $ctag->GetAtt('keyword')?>"> &quot;,&quot;逗号分开
</td>
</tr>
<tr>
<td height="28" align="left">排列顺序：</td>
<td height="28" align="left">
<?php
$orderby = $ctag->GetAtt('orderby');
$sorta = "sortrank,置顶权限值;pubdate,发布时间;senddate,录入时间;click,点击量;id,文档ＩＤ,lastpost,最后评论时间;postnum,评论总数;rand,随机获取";
$sortas = explode(';',$sorta);
foreach($sortas as $v)
{
$vs = explode(',',$v);
$vs[0] = trim($vs[0]);
$sortarrs[$vs[0]] = $vs[1];
}
?>
<select name="orderby" id="orderby" class="uk-select uk-form-small uk-form-width-medium">
<?php
echo "<option value=\"$orderby\" selected>{$sortarrs[$orderby]}</option>\r\n";
?>
<option value="sortrank">置顶权限值</option>
<option value="pubdate">发布时间</option>
<option value="senddate">录入时间</option>
<option value="click">点击量</option>
<option value="id">文档ＩＤ</option>
<option value="lastpost">最后评论时间</option>
<option value="postnum">评论总数</option>
</select>
　
<input name="order" type="radio" class="uk-radio" value="desc" <?php if($ctag->GetAtt('orderway')=='desc') echo 'checked';?>>
由高到低 &nbsp;&nbsp;
<input type="radio" name="order" class="uk-radio" value="asc" <?php if($ctag->GetAtt('orderway')=='asc') echo 'checked';?>>
由低到高
</td>
</tr>
<tr>
<td height="28" align="left">循环内的单行记录样式(InnerText)：</td>
<td height="28" align="left"><textarea name="innertext" cols="80" rows="6" id="myinnertext" style="height:120px" class="uk-textarea uk-form-small uk-form-width-large"><?php echo $ctag->GetInnerText()?></textarea></td>
</tr>
<!-- /选项 -->
</table>
</div>
</div>
<div class="uk-card-footer " >
<div class="uk-padding-small" >
<button type="submit" class="uk-button uk-button-small uk-button-primary">提交</button>
</div>
</div>
</div>
</form>
<!-- 列表底部 -->
<div class="bar-bottom uk-flex uk-light uk-flex-right">
<div class="uk-button-group" style="margin-left: 50px;">
</div>
<div class="e1e02">Copyright &copy; 2007-2021 <a href='http://www.dedecms.com' target='_blank'><u>DedeCMS</u></a>, 上海卓卓网络科技有限公司 (DesDev, Inc.)</div>
</div>
<!-- 列表底部 -->
<div style="display:none" id="list1">
<li>[field:textlink/]</li>
</div>
<div style="display:none" id="list2">
<li>[[field:typelink/]][field:textlink/]</li>
</div>
<div style="display:none" id="list3">
<table width='98%' border='0' cellspacing='2' cellpadding='0'>
<tr>
<td align='center'>[field:imglink/]</td>
</tr>
<tr>
<td align='center'>[field:textlink/]</td>
</tr>
</table>
</div>
<div style="display:none" id="list4">
<li>
[field:imglink/]
[field:textlink/]
<span class="info">
<small>日期：</small>[field:pubdate function="GetDateMK(@me)"/]
<small>点击：</small>[field:click/]
<small>好评：</small>[field:scores/]
</span>
<p class="intro"> [field:description/]...</p>
</li>
</div>
<!-- JS FILES -->
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/uikit/js/uikit-icons.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/pkg/jquery/jquery.min.js"></script>
<script src="{dede:global.cfg_assets_dir/}/js/dede.manage.min.js"></script>
<script language="JavaScript">
function ChangeListStyle() {
var itxt = document.getElementById("myinnertext");
var myems = document.getElementsByName("liststyle");
if (myems[0].checked) itxt.value = document.getElementById("list1").innerHTML;
else if (myems[1].checked) itxt.value = document.getElementById("list2").innerHTML;
else if (myems[2].checked) itxt.value = document.getElementById("list3").innerHTML;
else if (myems[3].checked) itxt.value = document.getElementById("list4").innerHTML;
itxt.value = itxt.value.replace("<BR>", "<BR/>");
itxt.value = itxt.value.toLowerCase();
}
function ShowHide(objname) {
var obj = document.getElementById(objname);
if (obj.style.display == "block" || obj.style.display == "")
obj.style.display = "none";
else
obj.style.display = "block";
}
function SelectTemplets(fname) {
if (document.all) {
var posLeft = window.event.clientY - 200;
var posTop = window.event.clientX - 300;
}
else {
var posLeft = 100;
var posTop = 100;
}
window.open("./dialog/select_templets.php?&activepath=<?php echo urlencode($cfg_templets_dir)?>&f=" + fname, "poptempWin", "scrollbars=yes,resizable=yes,statebar=no,width=600,height=400,left=" + posLeft + ", top=" + posTop);
}
function CheckSubmit() {
if (document.form1.title.value == "") {
alert("自由列表标题标题不能为空！");
document.form1.title.focus();
return false;
}
return true;
}
</script>
<!-- / JS FILES -->
</body>
</html>
